#set(seoTitle="用户登录")
#@layout()
#define main()
#define css()
<link rel="stylesheet" type="text/css" href="/static/css/hi-login.css">
#end
<!-- 内容区域 -->
<div id="wrapper">
    <div class="aw-login-box ">
        <div class="mod-body clearfix row">
            <div class="content col-sm-12 col-md-9">
                <a href="/">
                    <img height="80px" src="/static/img/logo.png" alt=""/>
                </a>
                <h2 style="color: white">拾光社区</h2>
                <form id="login_form" method="post" action="/login/doRegister">
                    <ul>
                        <li>
                            <input type="text" id="nickName" class="form-control" placeholder="昵称" name="nickName"/>
                        </li>
                        <li>
                            <input type="text" id="email" class="form-control" placeholder="邮箱 " name="email"/>
                        </li>
                        <li>
                            <input type="password" id="password" class="form-control" placeholder="密码" name="password"/>
                        </li>
                        <li class="alert alert-danger hide error_message">
                            <i class="icon icon-delete"></i>
                            <em></em>
                        </li>
                        <li class="last">
                            <input type="submit" class="login btn btn-small btn-primary" value="注册"/>
                        </li>
                    </ul>
                </form>
            </div>
            <div class="side-bar col-sm-12 col-md-3">
                <h3></h3>
                <a href="https://gitee.com/hkq15/hibbs.git" target="_blank" class="btn btn-block btn-github">
                    <i class="icon icon-github"></i>本站源码下载
                </a>
                <a target="_blank"
                   href="https://mp.weixin.qq.com/s?__biz=MzUxMTcwMDY1OQ==&mid=2247483792&idx=1&sn=21b2198899d259166edde727404ad024&chksm=f96efa4cce19735a0f428bb21fb8a89dd5e55825adabb6fe90b184d54630b44b1aed6ae6584f#rd"
                   class="btn btn-block btn-twitter">
                    <i class="icon icon-help"></i>官方公众号
                </a>
            </div>
        </div>
        <div class="mod-footer">
            <span>已有账号</span>&nbsp;&nbsp;
            <a href="/login/">立即登录</a>
            &nbsp;&nbsp;•&nbsp;&nbsp;
            <a href="/login/findPsw">忘记密码</a>
        </div>
    </div>
</div>
<!-- 内容区域end -->
#end

#define js()

<script type="text/javascript" src="/static/lib/jquery_form/jquery.form.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#login_form").ajaxForm({
            dataType: "json"
            , beforeSubmit: function (formData, jqForm, options) {
                // 表单提交之前回调
            }
            , success: function (ret) {
                if (ret.state == "ok") {
                    //showOkMsg(ret.msg);
                    location.href = ret.returnUrl;
                } else {
                    layer.msg(ret.msg, {
                            shift: 6
                            , shade: 0.3
                            , time: 7000			// 0 为不自动关闭窗口
                            , offset: "165px"
                            , closeBtn: 1
                            , shadeClose: true
                        }, function () {
                        }
                    );
                }
            }
            , error: function (ret) {
            }              // ret.status != 200 时回调
            , complete: function (ret) {
            }       // 无论是 success 还是 error，最终都会被回调
        });
    });
</script>
#end